/*
 * @Author: your name
 * @Date: 2021-04-14 00:40:51
 * @LastEditTime: 2021-04-17 14:02:32
 * @LastEditors: Please set LastEditors
 * @Description: Q&A
 * @FilePath: /medicine-web/src/store/modules/qa.js
 */
import rest from './../rest'
const qa = {
  state: {},
  mutations: {},
  actions: {
    async getQAList({ commit }, data) { // 获取Q&A列表
      const res = await rest.get('qa/search', data)
      if (res && res.code === 200) {
        return res.data
      }
      return {}
    },
    async getQADetail({ commit }, data) { // 获取Q&A详情
      const res = await rest.get('qa/info', data)
      if (res && res.code === 200) {
        return res.data
      }
      return {}
    }
  },
  getters: {}
}
export default qa